Includes APIs for enumerating cameras, creating handles, and turning on cameras.
More...
|
| def | MV_CC_EnumDevices (nTLayerType, stDevList) |
| | Enumerates devices. More...
|
| |
| def | MV_CC_EnumDevicesEx (nTLayerType, stDevList, strManufacturerName) |
| | Enumerates devices based on manufacturer name. More...
|
| |
| def | MV_CC_EnumDevicesEx2 (nTLayerType, stDevList, strManufacturerName, enSortMethod) |
| | Enumerates devices, supporting enumerating devices by specified sorting method and filtering by manufacturer name. More...
|
| |
| def | MV_CC_IsDeviceAccessible (stDevInfo, nAccessMode) |
| | Checks if the specified device can be accessed. More...
|
| |
| def | MV_CC_CreateHandle (self, stDevInfo) |
| | Creates device handle. More...
|
| |
| def | MV_CC_DestroyHandle (self) |
| | Destroys the device handle. More...
|
| |
| def | MV_CC_OpenDevice (self, nAccessMode=MV_ACCESS_Exclusive, nSwitchoverKey=0) |
| | Turns on the device. More...
|
| |
| def | MV_CC_CloseDevice (self) |
| | Turns off the device. More...
|
| |
| def | MV_CC_IsDeviceConnected (self) |
| | Checks if the device is connected. More...
|
| |
Includes APIs for enumerating cameras, creating handles, and turning on cameras.
◆ MV_CC_EnumDevices()
| def MvCameraControl_class.MV_CC_EnumDevices |
( |
|
nTLayerType, |
|
|
|
stDevList |
|
) |
| |
|
static |
Enumerates devices.
- Parameters
-
| nTLayerType | [IN] It refers to the transport layer protocol type. For more details, refer to CameraParams_const.py.
| Transport Layer Protocol Type | Value | Description |
| MV_UNKNOW_DEVICE | 0x00000000 | Unknown device type. |
| MV_GIGE_DEVICE | 0x00000001 | GigE vision device. |
| MV_1394_DEVICE | 0x00000002 | 1394-a/b device. |
| MV_USB_DEVICE | 0x00000004 | USB3 vision device. |
| MV_CAMERALINK_DEVICE | 0x00000008 | Serial port device, including Camera Link device and serial port light controller. |
| MV_VIR_GIGE_DEVICE | 0x00000010 | Virtual GigE vision device. |
| MV_VIR_USB_DEVICE | 0x00000020 | Virtual USB3 vision device. |
| MV_GENTL_GIGE_DEVICE | 0x00000040 | Self-developed NIC-based GigE vision device. |
| MV_GENTL_CAMERALINK_DEVICE | 0x00000080 | Camera Link device. |
| MV_GENTL_CXP_DEVICE | 0x00000100 | CoaXPress device. |
| MV_GENTL_XOF_DEVICE | 0x00000200 | XoF device. |
| MV_GENTL_VIR_DEVICE | 0x00000800 | Device connected to the virtual frame grabber. |
|
| pstDevList | [IN][OUT] It refers to the device list. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_EnumDevicesEx()
| def MvCameraControl_class.MV_CC_EnumDevicesEx |
( |
|
nTLayerType, |
|
|
|
stDevList, |
|
|
|
strManufacturerName |
|
) |
| |
|
static |
Enumerates devices based on manufacturer name.
- Parameters
-
| nTLayerType | [IN] It refers to the transport layer protocol type. For more details, refer to CameraParams_const.py.
| Transport Layer Protocol Type | Value | Description |
| MV_UNKNOW_DEVICE | 0x00000000 | Unknown device type. |
| MV_GIGE_DEVICE | 0x00000001 | GigE vision device. |
| MV_1394_DEVICE | 0x00000002 | 1394-a/b device. |
| MV_USB_DEVICE | 0x00000004 | USB3 vision device. |
| MV_CAMERALINK_DEVICE | 0x00000008 | Serial port device, including Camera Link device and serial port light controller. |
| MV_VIR_GIGE_DEVICE | 0x00000010 | Virtual GigE vision device. |
| MV_VIR_USB_DEVICE | 0x00000020 | Virtual USB3 vision device. |
| MV_GENTL_GIGE_DEVICE | 0x00000040 | Self-developed NIC-based GigE vision device. |
| MV_GENTL_CAMERALINK_DEVICE | 0x00000080 | Camera Link device. |
| MV_GENTL_CXP_DEVICE | 0x00000100 | CoaXPress device. |
| MV_GENTL_XOF_DEVICE | 0x00000200 | XoF device. |
| MV_GENTL_VIR_DEVICE | 0x00000800 | Device connected to the virtual frame grabber. |
|
| pstDevList | [IN][OUT] It refers to the device list. |
| strManufacturerName | [IN] It refers to the manufacturer name. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_EnumDevicesEx2()
| def MvCameraControl_class.MV_CC_EnumDevicesEx2 |
( |
|
nTLayerType, |
|
|
|
stDevList, |
|
|
|
strManufacturerName, |
|
|
|
enSortMethod |
|
) |
| |
|
static |
Enumerates devices, supporting enumerating devices by specified sorting method and filtering by manufacturer name.
- Parameters
-
| nTLayerType | [IN] It refers to the transport layer protocol type. Different types of devices are distinguished.
| Transport Layer Protocol Type | Value | Description |
| MV_UNKNOW_DEVICE | 0x00000000 | Unknown device type. |
| MV_GIGE_DEVICE | 0x00000001 | GigE vision device. |
| MV_1394_DEVICE | 0x00000002 | 1394-a/b device. |
| MV_USB_DEVICE | 0x00000004 | USB3 vision device. |
| MV_CAMERALINK_DEVICE | 0x00000008 | Serial port device, including Camera Link device and serial port light controller. |
| MV_VIR_GIGE_DEVICE | 0x00000010 | Virtual GigE vision device. |
| MV_VIR_USB_DEVICE | 0x00000020 | Virtual USB3 vision device. |
| MV_GENTL_GIGE_DEVICE | 0x00000040 | Self-developed NIC-based GigE vision device. |
| MV_GENTL_CAMERALINK_DEVICE | 0x00000080 | Camera Link device. |
| MV_GENTL_CXP_DEVICE | 0x00000100 | CoaXPress device. |
| MV_GENTL_XOF_DEVICE | 0x00000200 | XoF device. |
| MV_GENTL_VIR_DEVICE | 0x00000800 | Device connected to the virtual frame grabber. |
|
| pstDevList | [IN][OUT] It refers to the device list. |
| strManufacturerName | [IN] It refers to the manufacturer name (NULL means not filtering). |
| enSortMethod | [IN] It refers to the sorting method. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_IsDeviceAccessible()
| def MvCameraControl_class.MV_CC_IsDeviceAccessible |
( |
|
stDevInfo, |
|
|
|
nAccessMode |
|
) |
| |
|
static |
Checks if the specified device can be accessed.
- Parameters
-
| pstDevInfo | [IN] It refers to the device information. |
| nAccessMode | [IN] It refers to the access permission. For more details, see CameraParams_const.py.
| Constant | Value | Description |
| MV_ACCESS_Exclusive | 1 | The device owns exclusive permission. For other apps, only the CCP register is allowed to be read. |
| MV_ACCESS_ExclusiveWithSwitch | 2 | The device can be preemptively accessed under mode 5 and then turned on with exclusive permission. |
| MV_ACCESS_Control | 3 | The device can be turned on with control permission. For other apps, all registers are allowed to be read. |
| MV_ACCESS_ControlWithSwitch | 4 | The device can be preemptively accessed under mode 5 and then turned on with control permission. |
| MV_ACCESS_ControlSwitchEnable | 5 | The device can be turned on with preemptible control permission. |
| MV_ACCESS_ControlSwitchEnableWithKey | 6 | The device can be preemptively accessed under mode 5 and then turned on with preemptible control permission. |
| MV_ACCESS_Monitor | 7 | The device can be turned on in read mode. It is applicable to devices under control permission. |
|
- Note
- For Camera Link devices, this API is not supported, and false will be returned.
◆ MV_CC_CreateHandle()
| def MvCameraControl_class.MV_CC_CreateHandle |
( |
|
self, |
|
|
|
stDevInfo |
|
) |
| |
Creates device handle.
- Parameters
-
| handle | [IN][OUT] It refers to the device handle. |
| pstDevInfo | [IN] It refers to the device information. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_DestroyHandle()
| def MvCameraControl_class.MV_CC_DestroyHandle |
( |
|
self | ) |
|
Destroys the device handle.
- Parameters
-
| handle | [IN] It refers to the device handle. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_OpenDevice()
| def MvCameraControl_class.MV_CC_OpenDevice |
( |
|
self, |
|
|
|
nAccessMode = MV_ACCESS_Exclusive, |
|
|
|
nSwitchoverKey = 0 |
|
) |
| |
Turns on the device.
- Parameters
-
| handle | [IN] It refers to the device handle. |
| nAccessMode | [IN] It refers to the access permission. For more details, see CameraParams_const.py.
| Constant | Value | Description |
| MV_ACCESS_Exclusive | 1 | The device owns exclusive permission. For other apps, only the CCP register is allowed to be read. |
| MV_ACCESS_ExclusiveWithSwitch | 2 | The device can be preemptively accessed under mode 5 and then turned on with exclusive permission. |
| MV_ACCESS_Control | 3 | The device can be turned on with control permission. For other apps, all registers are allowed to be read. |
| MV_ACCESS_ControlWithSwitch | 4 | The device can be preemptively accessed under mode 5 and then turned on with control permission. |
| MV_ACCESS_ControlSwitchEnable | 5 | The device can be turned on with preemptible control permission. |
| MV_ACCESS_ControlSwitchEnableWithKey | 6 | The device can be preemptively accessed under mode 5 and then turned on with preemptible control permission. |
| MV_ACCESS_Monitor | 7 | The device can be turned on in read mode. It is applicable to devices under control permission. |
|
| nSwitchoverKey | [IN] It refers to the secret key for switching access permission. Only valid for GigE vision devices. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_CloseDevice()
| def MvCameraControl_class.MV_CC_CloseDevice |
( |
|
self | ) |
|
Turns off the device.
- Parameters
-
| handle | [IN] It refers to the device handle. |
- Returns
- Returns MV_OK for success, and returns corresponding Error Code for failure.
◆ MV_CC_IsDeviceConnected()
| def MvCameraControl_class.MV_CC_IsDeviceConnected |
( |
|
self | ) |
|
Checks if the device is connected.
- Parameters
-
| handle | [IN] It refers to the device handle. |
- Returns
- Returns true if the device is connected, and returns false if the device is not connected or disconnected.